#include "StdAfx.h"
#include "TabPageUI.h"
#include "Size.h"
#include "ControlUI.h"
#include "IList.h"

CTabPageUI::CTabPageUI(void)
{
	SetInset(CStdSize(6, 6));
}

CTabPageUI::~CTabPageUI(void)
{
}

LPCTSTR CTabPageUI::GetClass() const
{
	return _T("TabPageUI");
}

bool CTabPageUI::Activate()
{
	if( !CContainerUI::Activate() ) return false;
	CControlUI* pParent = GetParent();
	if( pParent == NULL || pParent->GetInterface(_T("ListOwner")) == NULL ) return false;
	return static_cast<IListOwnerUI*>(pParent->GetInterface(_T("ListOwner")))->SelectItem(0 /*m_iIndex*/);
}
